export function handleTime(date) {
  const y = date.getFullYear()
  const m = date.getMonth() + 1
  return y + '年' + m + '月'
}

export function handleDate(date) {
  const Y = date.getFullYear()
  const M = date.getMonth() + 1
  const D = date.getDate()
  const h = date.getHours()
  const m = date.getMinutes()
  return Y + '年' + M + '月' + D + '日' + h + '时' + m + '分'
}

export function compareDate(date1,date2){
  var oDate1 = new Date(date1);
  var oDate2 = new Date(date2);
  if(oDate1.getTime() > oDate2.getTime()){
      return true; //第一个大
  } else {
      return false; //第二个大
  }
}
